-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: keep normalize.css pristine #46
refactor: keep normalize.css pristine #46
Conversation
Is the plan to revert other changes to normalize.css in another PR? I've not been keeping track of the changes, but it seems like we've modified a few other things. |
Cleaning up CSS stylesheets is something I'm focusing on. Basically the goal is to export a stylesheet that would replace the
Related discussion: freeCodeCamp/freeCodeCamp#52030 (comment). I honestly don't have much context on the stylesheet situation. The only stylesheet I remember adding is I'm currently writing an issue for the CSS stylesheets standardization / simplification to communicate what I understand so far and the strategy I propose to clean up those files. That would hopefully give you some context on the plan and the changes as well. |
Yep, 100% agree. Unfortunately I think we must have modified it more than once, because it doesn't seem to match up with https://unpkg.com/browse/[email protected]/normalize.css (even with your fixes). |
Yep, that made me pull my hair. So the thing is, in the CSS simplification work that I mentioned, I'll look into whether we need
This PR is a prep for both cases. The change is small / incomplete because I'm just moving my recent change–the change that I'm confident touching and have full context. And I'm not trying to go back to the official |
Thanks for explaining, @huyenltnguyen, that all makes sense. Also, I share your frustration! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Description
Checklist:
Update index.md
)This PR moves a CSS rule out of the
normalize.css
file.The rule was added during the Modal component implementation (ref: freeCodeCamp/freeCodeCamp#54044 (comment)). But I'm looking at all of the stylesheets in the package again, I don't think we should add custom rules to
normalize.css
as it would make thenormalize
upgrade more complicated (as opposed to just copy-pasting).The candidates to house the change are
global-element-styles.css
andbase.css
. I tried adding the code toglobal-element-styles.css
but it didn't work, so I applied the change tobase.css
instead.base.css
also makes more sense as the file imports Tailwind styles, and the rule we are adding is also recommended by Tailwind.(Heads-up: I'll have more CSS cleanup coming, but I'm currently ironing things out first.)
Testing
Start Storybook and check if the Modal is displayed properly (the border is significantly thicker if the rule isn't applied).